﻿using HCQ2_Model;
using HCQ2_Model.DocModel;
using HCQ2_Model.DocModel.APIModel;
using HCQ2_Model.DocModel.APIResultModel;
using HCQ2_Model.Pay;
using HCQ2_Model.VR.Model;
using HCQ2_Model.VR.Params;
using HCQ2_Model.VRDD.InputDto._0730;
using HCQ2_Model.VRDD.InputDto._210908;
using HCQ2_Model.VRDD.OutputDto._0730;
using HCQ2_Model.VRDD.OutputDto._210908;
using HCQ2_Model.VRDevice.ParamModel;
using HCQ2_Model.VRDevice.ResultModel;
using HCQ2_Model.VRQDMeta.OutputDto;
using HCQ2WebAPI_Logic.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_IDAL
{
    public partial interface IT_DocumentInfoDAL
    {
        //*******************************************奇点元宇宙***********************************************
        /// <summary>
        ///  获取奇点元宇宙【应用】列表
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <param name="total">返回总条数</param>
        /// <returns></returns>
        List<MetaListResult> GetQDMetaList(QDMetaParam param, out int total);
        /// <summary>
        ///  获取数据【应用】
        /// </summary>
        /// <param name="file_id"></param>
        /// <returns></returns>
        MetaListResult GetProgramData(int file_id);
        /// <summary>
        ///  获取奇点元宇宙【房间】列表
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <param name="total">返回总条数</param>
        /// <returns></returns>
        List<MetaRoomResult> GetQDMetaRoomList(QDMetaParam param, out int total);
        /// <summary>
        ///  获取数据【房间】
        /// </summary>
        /// <param name="file_id"></param>
        /// <returns></returns>
        MetaRoomResult GetRoomData(int file_id);        
        //*******************************************VR楼宇***********************************************
        /// <summary>
        ///  获取设备类别
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <param name="total">返回总条数</param>
        /// <returns></returns>
        List<VRBuildResult> GetVRBuildList(VRdeviceParam param, out int total);
        //*******************************************VR设备***********************************************
        /// <summary>
        ///  获取设备类别
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <param name="total">返回总条数</param>
        /// <returns></returns>
        List<VRdeviceResult> GetVRDeviceList(VRdeviceParam param,out int total);
        /// <summary>
        ///  获取设备信息
        /// </summary>
        /// <param name="file_id"></param>
        /// <returns></returns>
        VRdeviceResult GetVRDevicePrice(int file_id);
        //********************************************end*************************************************
        /// <summary>
        ///  我的文档
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        List<DocTreeResultModel> GetTableByOwnDoc(DocTableParamModel model, int user_id);
        /// <summary>
        ///  我的文档 数量统计
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        int GetTableByOwnDocCount(DocTableParamModel model, int user_id);
        /// <summary>
        ///  获取产品目录树下的数量
        /// </summary>
        /// <param name="folder_path"></param>
        /// <returns></returns>
        int GetProDocCount(string folder_path,bool notType=false);
        /// <summary>
        ///  我的分享
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        List<DocTreeResultModel> GetTableByOwnShareDoc(DocTableParamModel model, int user_id);
        /// <summary>
        ///  我的分享 数量统计
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        int GetTableByOwnShareDocCount(DocTableParamModel model, int user_id);
        /// <summary>
        ///  我的收藏
        /// </summary>
        /// <param name="model">参数</param>
        /// <param name="user_id">用户id</param>
        /// <param name="roles">角色id集合</param>
        /// <param name="groups">组id集合</param>
        /// <returns></returns>
        List<DocTreeResultModel> GetTableShareByOwnDoc(DocTableParamModel model, int user_id);
        /// <summary>
        ///  我的收藏 数量统计
        /// </summary>
        /// <param name="model">参数</param>
        /// <param name="user_id">用户id</param>
        /// <param name="roles">角色id集合</param>
        /// <param name="groups">组id集合</param>
        /// <returns></returns>
        int GetTableShareByOwnDocCount(DocTableParamModel model, int user_id);
        /// <summary>
        ///  公用文档
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        List<DocTreeResultModel> GetTablePublicDoc(DocTableParamModel model, int user_id, int fileStatus = 5);       
        /// <summary>
        ///  公用文档 数量统计
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        int GetTablePublicDocCount(DocTableParamModel model, int user_id, int fileStatus = 5);
        /// <summary>
        ///  免费共享+别人给的分享
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        List<DocTreeResultModel> GetPublicDocOrShare(DocTableParamModel model, int user_id, List<int> roles);
        /// <summary>
        ///  免费共享+别人给的分享
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        int GetPublicDocOrShareCount(DocTableParamModel model, int user_id, List<int> roles);
        /// <summary>
        ///  统计自己目录下的文档数量
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        int GetTablePublicDocCountByOwn(DocTableParamModel model, int user_id, int fileStatus = 5);
        /// <summary>
        ///  回收站
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        List<DocTreeResultModel> GetTableRemoveDoc(DocTableParamModel model, int user_id);
        /// <summary>
        ///  回收站 数量统计
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        int GetTableRemoveDocCount(DocTableParamModel model, int user_id);
        /// <summary>
        ///  5：待审核资源
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        List<DocTreeResultModel> GetTableApproveDoc(DocTableParamModel model, int user_id,string unit_code);
        /// <summary>
        ///  5：待审核资源 数量统计
        /// </summary>
        /// <param name="model"></param>
        /// <param name="user_id">用户id</param>
        /// <returns></returns>
        int GetTableApproveDocCount(DocTableParamModel model, int user_id, string unit_code);
        /// <summary>
        ///  获取用户当天上传数据
        /// </summary>
        /// <param name="user_id">用户ID</param>
        /// <param name="modelType">模块类别</param>
        /// <returns></returns>
        int GetUpNumByUser(int user_id,string modelType);
        /// <summary>
        ///  获取列表数据：头记
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        List<DocTreeResultModel> GetProTableList(HeadTableParamModel model);
        /// <summary>
        ///   获取列表数据数量：头记
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int GetProCount(HeadTableParamModel model);
        /// <summary>
        ///  批量编辑作品
        /// </summary>
        /// <param name="fileId"></param>
        /// <param name="file_classify"></param>
        /// <param name="org_unit"></param>
        /// <returns></returns>
        int SaveBatchFile(string fileId, string file_classify, string org_unit,string unit_name);

        //************************************获取字典******************************************
        /// <summary>
        ///  根据代码获取字典下拉
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        List<ResultSelectVal> GetDocDictByCode(SelectKeyModel code);

        //************************************APP接口************************************
        /// <summary>
        /// 获取商品列表
        /// </summary>
        /// <param name="model"></param>
        /// <param name="userId"></param>
        /// <param name="total">返回数量</param>
        /// <returns></returns>
        List<GoodsListModel> GetAPPShopList(ViewGoodsModel model, int userId, out int total);
        /// <summary>
        /// 获取商品详情
        /// </summary>
        /// <param name="file_id"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        GoodsListModel GetAPPGoodsDetail(int file_id, int user_id = 0);
        /// <summary>
        ///  获取商品总量
        /// </summary>
        /// <param name="model"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int GetAPPShopCount(ViewGoodsModel model, int userId);
        /// <summary>
        ///  获取我的资源/作品
        /// </summary>
        /// <param name="folderId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<GoodsListModel> GetSynchronMyVR(DocListParam model, int userId);
        /// <summary>
        ///  统计我的资源/作品 数量
        /// </summary>
        /// <param name="model"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int GetSynchronMyVRCount(DocListParam model, int userId);
        /// <summary>
        ///  判断用户是否购买过此商品
        /// </summary>
        /// <param name="fileId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int PayCountByFileId(int fileId, int userId);
        /// <summary>
        ///  判断文件是否有被分享给用户没有
        /// </summary>
        /// <param name="fileId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int ShareFileToUser(int fileId, int userId);
        /// <summary>
        ///  统计审核权限
        /// </summary>
        /// <param name="perId"></param>
        /// <returns></returns>
        int IsApproveLimit(List<int> perId);

        /// <summary>
        ///  获取附件地址
        /// </summary>
        /// <param name="file_id"></param>
        /// <returns></returns>
        PayDocFileOptionsModel GetBagFileRecord(int file_id);
        /// <summary>
        ///  获取商品购买使用截止时间
        /// </summary>
        /// <param name="file_id"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        PayNorderModel GetFileEndTime(int file_id, int user_id);
        /// <summary>
        ///  获取作品集合的附件信息
        /// </summary>
        /// <param name="fileIds"></param>
        /// <returns></returns>
        List<DelRecordOption> GetFildDelRecord(List<int> fileIds);
        /// <summary>
        ///  判断是否允许被删除
        /// </summary>
        /// <param name="file_id"></param>
        /// <returns></returns>
        int CheckDelFile(int file_id);
        /// <summary>
        ///  获取用户收藏的商品和作品
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        List<UserFavoriteList> GetUserFavorite(UserFavorite param, int user_id);
        /// <summary>
        ///  获取用户浏览历史
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        List<UserBrowseResult> GetUserBrowse(InputUserBrowseParam param);
        /// <summary>
        ///  获取我的收藏商品列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        List<MyGoodsFavorite> GetMyGoodsFavorite(InputMyGoods param, int user_id);
        /// <summary>
        ///  获取店铺商品列表
        /// </summary>
        /// <param name="param"></param>
        /// <param name="user_id"></param>
        /// <returns></returns>
        List<OutputGoodsByStore> GetGoodsByStoreList(InputGoodsByStore param,int user_id, out int total);
        /// <summary>
        ///  获取商品规格信息
        /// </summary>
        /// <param name="file_id"></param>
        /// <returns></returns>
        List<OutputSpecInfo> GetSpecInfo(int file_id);
    }
}